package com.lyf.scm.admin.domain.remote.allocationservice;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.api.dto.EChartsDTO;
import com.lyf.scm.admin.api.dto.SalesPlanDirectlyAccuracyDTO;
import com.lyf.scm.admin.api.dto.SalesPlanDirectlyAccuracyInfoDTO;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 直营预测计划_销售计划准确率
 *
 * @author wangchlei
 * @date 2020/08/13
 */
@FeignClient(name = "scm-plan-service")
public interface SalesPlanDirectlyAccuracyRemote {
    /**
     * 按条件查询直营预测计划_销售计划准确率(周)
     *
     * @param salesPlanDirectlyAccuracyDTO
     * @return {@link Response < PageInfo < SalePlanDirectlyDifferinInfoDTO >>}
     **/
    @PostMapping("/api/v1/salesPlanDirectlyAccuracy/listByWeek")
    Response<PageInfo<SalesPlanDirectlyAccuracyInfoDTO>> listWeekBySelective(@RequestBody SalesPlanDirectlyAccuracyDTO salesPlanDirectlyAccuracyDTO);

    /**
     * 图表数据接口
     *
     * @param salesPlanDirectlyAccuracyDTO
     * @return {@link Response< EChartsDTO >}
     **/
    @PostMapping("/api/v1/salesPlanDirectlyAccuracy/eChartsData")
    Response<EChartsDTO> listAllByCycles(@RequestBody SalesPlanDirectlyAccuracyDTO salesPlanDirectlyAccuracyDTO);

    @PostMapping(value = "/api/v1/salesPlanDirectlyAccuracy/export",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    feign.Response export(@RequestBody SalesPlanDirectlyAccuracyDTO salesPlanDirectlyAccuracyDTO, @RequestParam("type") Integer type);

    /**
     * 删除直营预测计划准确率
     *
     * @param opSign
     * @return
     */
    @PostMapping("/api/v1/salesPlanDirectlyAccuracy/delete")
    Response delete(@RequestParam("opSign") String opSign);
}
